package system

import "mycms/model/common/request"

// 角色列表--分页条件查询及排序结构体
type SearchRoleParams struct {
	Name   string `json:"name" form:"name"`
	Status uint   `json:"status" form:"status"`
	request.PageInfo
}

// 创建角色参数
type CreateRoleParams struct {
	Name   string `json:"name" form:"name" validate:"required" comment:"角色名称"`
	Code   string `json:"code" form:"code" validate:"required" comment:"角色标签"`
	Status uint   `json:"status" form:"status" validate:"required" comment:"状态"`
	Remark string `json:"remark" form:"remark" comment:"备注"`
	Menus  []uint `json:"menus" form:"menus" comment:"权限菜单"`
}

// 角色详情参数
type RoleInfoParams struct {
	Id uint `json:"id" form:"id" validate:"required" comment:"ID"`
}

// 创建角色参数
type UpdateRoleParams struct {
	Id     uint   `json:"id" form:"id" validate:"required,numeric" comment:"ID"`
	Name   string `json:"name" form:"name" validate:"required" comment:"角色名称"`
	Code   string `json:"code" form:"code" validate:"required" comment:"角色标签"`
	Status uint   `json:"status" form:"status" validate:"required" comment:"状态"`
	Remark string `json:"remark" form:"remark" comment:"备注"`
	Menus  []uint `json:"menus" form:"menus" comment:"权限菜单"`
}

// 删除角色参数
type RoleDelParams struct {
	Id uint `json:"id" form:"id" validate:"required" comment:"ID"`
}
